This allows tools to see and operate on the "real" root conveniently;
for example, ostree clearly needs to operate on /ostree/repo.
rm ostree/gnomeos-origin/debian-setup.sh
(cd ostree/gnomeos-origin; find . '!' -type p | grep -v '^.$' | $OSTREE commit -s 'Run debian-setup.sh' --repo=../repo --from-stdin)
- cp -p ${SRCDIR}/chroot_break ostree/gnomeos-origin/sbin/chroot_break
- (cd ostree/gnomeos-origin; $OSTREE commit -s 'Add chroot_break' --repo=../repo --add=sbin/chroot_break)
+ # This is the name for the real rootfs, not the chroot
+ (cd ostree/gnomeos-origin;
+ mkdir sysroot;
+ $OSTREE commit -s 'Add sysroot' --repo=../repo --add=sysroot)
(cd ostree;
rev=$($OSTREE rev-parse --repo=repo master)
kv=`uname -r`
kernel=/boot/vmlinuz-${kv}
-exec qemu-kvm -kernel ${kernel} -initrd gnomeos-initrd.img -hda gnomeos-fs.img -append "root=/dev/sda ostree=current"
+exec qemu-kvm -kernel ${kernel} -initrd gnomeos-initrd.img -hda gnomeos-fs.img -append "root=/dev/sda ostree=current $1"
}
}
+ snprintf(destpath, sizeof(destpath), "%s/sysroot", subroot_path);
+ if (mount(newroot, destpath, NULL, MS_BIND, NULL) < 0) {
+ perrorv("Failed bind mount sysroot");
+ return -1;
+ }
+
if (chdir(newroot)) {
perrorv("failed to change directory to %s", newroot);
return -1;